"""
channel factory
"""
import logging


def create_bot(bot_type):
    """
    create a channel instance
    :param channel_type: channel type code
    :return: channel instance
    """
    logging.info('bot_type:{}'.format(bot_type))

    if bot_type == 'chatGPT':
        # ChatGPT 网页端web接口
        from bot.chatgpt.chat_gpt_bot import ChatGPTBot
        return ChatGPTBot()

    elif bot_type == 'nluGPT':
        # lingxi
        from bot.nlu_gpt.nlu_gpt_bot import NluiGptBot
        lingxigptbot = NluiGptBot()
        return lingxigptbot

    elif bot_type == 'indexAssistance':
        # response with index assistence
        from bot.documentassistance.document_assistance_bot import DocumentAssistanceBot
        return DocumentAssistanceBot()

    elif bot_type == "plannerGPT":
        from bot.insurance_planner_gpt.planner import PlannerChat
        planner_chat = PlannerChat(None)
        return planner_chat

    elif bot_type == "insuranceSaleGPT":
        from bot.insurance_consultant.sales import SaleGPT
        return SaleGPT()

    elif bot_type == "insuranceSaleGPT_mf":
        from bot.insurance_consultant_simple.sales import SaleGPT
        return SaleGPT()

    elif bot_type == "insuranceSaleGPT_dx":
        from bot.insurance_consultant_dx.sales import SaleGPT
        return SaleGPT()

    elif bot_type == "axinsur":
        from bot.insurance_consultant_axinsur.sales import SaleGPT
        return SaleGPT()

    elif bot_type == 'creditSaleGPT':
        from bot.credit_sales_gpt.credit_sales_gpt import creditSalesGpt
        return creditSalesGpt()

    elif bot_type == 'insurancePensionSaleGPT':
        from bot.insurance_sales.sales import SaleGPT
        return SaleGPT()

    elif bot_type == 'insurancePensionSaleSelf':
        from bot.insurance_sales.sales import SaleGPTSelf
        return SaleGPTSelf()

    elif bot_type == 'insurancePensionSaleSteam':
        from bot.insurance_sales.sales import SaleGPTSteam
        return SaleGPTSteam()

    elif bot_type == 'financialSales':
        from bot.financial_sales.sales import SaleGPT
        return SaleGPT()

    elif bot_type == 'modelTesSales':
        from bot.financial_sales.sales import SaleGPT
        return SaleGPT()
    raise RuntimeError
